/*
 * The X-Minou Projet
 * X-Minou is a text, irc like chat program for
 * local users of Unix system
 *
 * Author :  RaX| <raxxx.fr@gmail.com>
 *
 * Xminou in a free software released as-is.
 */

#ifndef __XMINOU_INTF_HH
#define __XMINOU_INTF_HH

#include <ncurses.h>
#include <pthread.h>

#include "xminou.hh"
#include "xminou_users.hh"
#include "xminou_write.hh"

class NCursesIntf
{

public:

  NCursesIntf (void);
  virtual ~NCursesIntf (void);

  void run (void);

private:

  bool cmd_cmp (char*, const char*);

  void show_help (void);
  void show_list (void);
  void show_history  (void);

  void write_action (std::string);
  void write_miaou (std::string);
  void write_homer (std::string);
  void write_bugs (std::string);

  void clear (void);

  UsersFile::UsersFile u;
  WriteToFile::WriteToFile write_obj;
  pthread_t view_thread;

};

void* file_reader_thread (void*);

#endif /* __XMINOU_INTF_HH */
